#!/usr/bin/env python
# $Id: pluke 3 2008-10-21 08:56:46Z clsung $
import sys
from datetime import datetime
from plukerunner import PlukeRunner
from lucene import initVM, CLASSPATH

if __name__ == '__main__':
    start = datetime.now()
    INDEXPATH = ""
    if len(sys.argv) > 1:
        INDEXPATH = sys.argv[1]
    initVM(CLASSPATH)
    try:
        pluke = PlukeRunner(INDEXPATH)
        pluke.cmdloop()
        end = datetime.now()
        print end - start
    except Exception, e:
        print "Main Exception: ", e
